﻿@using Smartstore.Web.Models.Identity;

@model ChangePasswordModel

@{
    Assets.AppendTitleParts(T("PageTitle.Account"));

    Layout = "_MyAccount";
    ViewBag.PageClassToken = "changepassword";
    ViewBag.PageTitle = T("Account.ChangePassword");
}

<form asp-action="ChangePassword" asp-controller="Identity" method="post" class="form-horizontal">

    @if (ViewContext.ViewData.ModelState.ContainsKey(""))
    {
        <div asp-validation-summary="ModelOnly"></div>
    }

    <div sm-if="Model.Result.HasValue()" class="alert alert-info">
        @Model.Result
    </div>

    <div class="form-group row">
        <label asp-for="OldPassword" class="col-lg-4 col-form-label required"></label>
        <div class="col-lg-8">
            <input asp-for="OldPassword" sm-required="true" />
            <span asp-validation-for="OldPassword"></span>
        </div>
    </div>
    <div class="form-group row">
        <label asp-for="NewPassword" class="col-lg-4 col-form-label required"></label>
        <div class="col-lg-8">
            <input asp-for="NewPassword" sm-required="true" />
            <span asp-validation-for="NewPassword"></span>
        </div>
    </div>
    <div class="form-group row">
        <label asp-for="ConfirmNewPassword" class="col-lg-4 col-form-label required"></label>
        <div class="col-lg-8">
            <input asp-for="ConfirmNewPassword" sm-required="true" />
            <span asp-validation-for="ConfirmNewPassword"></span>
        </div>
    </div>

    <div class="form-group row">
        <div class="col col-sm-auto offset-sm-4 text-muted">
            @T("Common.FormFields.Required.Hint")
        </div>
    </div>

    <div class="form-group row">
        <div class="col">
            <button type="submit" class="btn btn-lg btn-primary">
                <i class="fa fa-check"></i>
                <span>@T("Account.ChangePassword.Button")</span>
            </button>
        </div>
    </div>
</form>